import request from '@/utils/request'

// 查询工单类别列表
export function listWorkorderType(query) {
  return request({
    url: '/workorder/workorderType/list',
    method: 'get',
    params: query
  })
}

// 查询工单类别详细
export function getWorkorderType(woCatalogId) {
  return request({
    url: '/workorder/workorderType/' + woCatalogId,
    method: 'get'
  })
}

// 新增工单类别
export function addWorkorderType(data) {
  return request({
    url: '/workorder/workorderType',
    method: 'post',
    data: data
  })
}

// 修改工单类别
export function updateWorkorderType(data) {
  return request({
    url: '/workorder/workorderType',
    method: 'put',
    data: data
  })
}

// 删除工单类别
export function delWorkorderType(woCatalogId) {
  return request({
    url: '/workorder/workorderType/' + woCatalogId,
    method: 'delete'
  })
}
